export const detail={
    state: {
        cartList:[],
        good:{}
    },
    mutations: {
        setCartList:(state,list)=>{
            if(!state.cartList.length){
                state.cartList=[]
            }
            state.cartList.push(list)
            // // state.cartList.slice(0,22)  //清空数组
            // state.cartList=[]
            console.log(state.cartList);
         
           
        },
        setGood:(state,good)=>{state.good=good}
    },
    actions: {
            SETCARTLIST:({commit},list)=>{
                commit('setCartList',list)
            },
            SETGOOD:({commit},good)=>{
                commit('setGood',good)
            }
    }
}